package StudentSystem;

public class InformationFindSystem extends InformationSystem {
    public InformationFindSystem(){

        if (dkxz==2){
            System.out.println("<<<信息查询系统>>>");
            if(stpd==0){
                    System.out.println("学生个人信息");
                    System.out.println("    学号：" + student.get(wz).user_id);
                    System.out.println("    学生名字：" + student.get(wz).name);
                    System.out.println("    学生性别：" + student.get(wz).sex);
                    System.out.println("学生选课信息");
                    System.out.printf("    %-15s%-15s%-15s%s","课程号:" , "课程名字:" ,"课程时间:" ,"课程地点:\n");
                    for (int i = 0; i < student.get(wz).course_id.length; i++) {
                        System.out.printf("        %-15s%-15s%-15s%s",student.get(wz).course_id[i] , student.get(wz).course_name[i] ,student.get(wz).course_time[i] ,student.get(wz).course_sit[i]+"\n");
                    }
            }
            if(stpd==1){
                    System.out.println("教师个人信息");
                    System.out.println("    教师号：" + teacher.get(wz).user_id);
                    System.out.println("    教师名字：" + teacher.get(wz).name);
                    System.out.println("    教师性别：" + teacher.get(wz).sex);
                    System.out.println("教师授课信息");
                    System.out.printf("    %-15s%-15s%-15s%s","课程号:" , "课程名字:" ,"课程时间:" ,"课程地点:\n");
                    for (int i = 0; i < teacher.get(wz).course_id.length; i++) {
                        System.out.printf("        %-15s%-15s%-15s%s",teacher.get(wz).course_id[i] , teacher.get(wz).course_name[i] ,teacher.get(wz).course_time[i] ,teacher.get(wz).course_sit[i]+"\n");
                    }
            }
        }}
}
